{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>用户详情</h5>
                </div>
                <div class="ibox-content layui-form">
                    <div class="layui-row layui-col-space10 layui-form-item ">

                        <input type="hidden" class="layui-input" value="{$info.user_id}" name="user_id" />
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">昵称：</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input" lay-verify="required" value="{$info.user_username}" name="user_username">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">用户备注：</label>
                            <div class="layui-input-block">
                                <input type="text" class="layui-input"  value="{$info.user_remark}" name="user_remark">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">手机号：</label>
                            <div class="layui-input-block">
                                <input type="tel" class="layui-input" lay-verify="required" value="{$info.user_phone}" name="user_phone">
                            </div>
                        </div>
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <label class="layui-form-label">头像：</label>
                            <input type="hidden" name="user_image" id="lay-img" lay-verify="image" value="{$info.user_image}">
                            <div class="layui-input-block">
                                <div id="lay-upload">上传图片</div>
                                <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;">
                                    预览图：
                                    <div class="layui-upload-list" id="lay-list">
                                        <img class="layui-append-img" src="{$info.user_image}" onerror="this.src='/static/admin/images/no_img.jpg'">
                                    </div>
                                </blockquote>
                            </div>
                        </div>
                        <!--<div class="layui-form-item layui-col-md-offset1 layui-col-md8">-->
                            <!--<label class="layui-form-label">用户权限：</label>-->
                            <!--<div class="layui-input-block">-->
                                <!--<input type="checkbox" {if in_array(11,$open)}checked{/if} value="11" name="tens[]" title="品牌优惠" />-->
                                <!--<input type="checkbox" {if in_array(12,$open)}checked{/if} value="12" name="tens[]" title="人才招聘" />-->
                                <!--{volist name='tens' id='t'}-->
                                <!--<input type="checkbox" {if in_array($t.ten_id,$open)}checked{/if} value="{$t.ten_id}" name="tens[]" title="{$t.ten_name}" />-->
                                <!--{/volist}-->
                            <!--</div>-->
                        <!--</div>-->
                        <div class="layui-form-item layui-col-md-offset1 layui-col-md8">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit="" lay-filter="component-form-element">保存
                                </button>
                                <button class="layui-btn layui-btn-primary" onclick="wk.layer_close('close')">关闭</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
</body>
</html>
<script>
    wk.uploadImg({size:5,type:'png,jpg,jpeg',url:"{:url('Upload/upload')}",domain:""});
    layui.use(['form','upload','layedit'], function() {
        var form = layui.form;
        form.on('submit(component-form-element)', function (data) {
            $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
            $.ajax({
                url:"{:url('memberDetail')}",
                type:'post',
                dataType:'json',
                data:data.field,
                success:function(res){
                    if (res.code == 200) {
                        layer.msg(res.msg,{icon:1,time:1500,shade:0.1},function(index){
                            wk.layer_close();
                        })
                    } else {
                        wk.error(res.msg,'','$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\');');
                    }
                }
            })
        });
    });
</script>